package com.banyuan.service.impl;

import com.banyuan.mapper.AccountMapper;
import com.banyuan.service.IAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author yzt
 */
@Service
public class AccountServiceImpl implements IAccountService {

    @Autowired
    private AccountMapper accountMapper;

    @Override
    public int update(Integer id1, Integer id2, Double money) {
        accountMapper.update(id1,-money);
        int update = accountMapper.update(id2, money);
        return update;
    }
}
